<template>
  <div class="view-container notice-list">
    <header class="view-header">
      <div class="header-container">
        <div class="header-title">
          <i class="el-icon-s-grid"></i>
          <span>待办收文</span>
        </div>
        <div class="header-form">
          <div class="header-form-item">
            <el-button icon="el-icon-refresh-right" @click="refresh">刷新</el-button>
          </div>
<!--          <div class="header-form-item">
            <el-button type="success" icon="el-icon-edit" @click="edit">编辑</el-button>
          </div>
          <div class="header-form-item">
            <el-button type="danger" :loading="delLoading" icon="el-icon-delete" @click="del">删除</el-button>
          </div>-->
          <!--更多-->
          <!--<div class="header-form-item">
            <el-dropdown @command="handleCommand">
              <el-button type="default" :loading="delLoading">
                更多<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>
              </el-button>
              <el-dropdown-menu slot="dropdown">
                <el-dropdown-item icon="el-icon-refresh-right" class="color-refresh-item" command="refresh">刷新</el-dropdown-item>
                <el-dropdown-item icon="el-icon-edit" class="color-edit-item" command="edit">编辑</el-dropdown-item>
                <el-dropdown-item icon="el-icon-delete" class="color-del-item" command="del">{{isBatchesDel}}</el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>
          </div>-->
          <!--搜索-->
<!--          <div class="header-form-item">
            <el-button type="primary" icon="el-icon-search" @click="fetchData">查询</el-button>
          </div>-->
        </div>
      </div>
    </header>
    <section class="table-container view-section">
      <el-table
        ref="table"
        :data="tableData"
        stripe
        border
        @selection-change="handleSelectionChange"
        @row-click="handleRowClick"
      >
        <el-table-column type="selection" align="center"/>
        <el-table-column prop="docTitle" label="文档标题" align="center" >
          <template slot-scope="c">
            <el-link @click="goDetail(c.row.docId)">{{c.row.docTitle}}</el-link>
          </template>
        </el-table-column>
        <el-table-column prop="receiptDate" label="来文日期" align="center" sortable/>
        <el-table-column prop="codeName" label="来文文号" align="center" />
        <el-table-column prop="codeNo" label="收文号" align="center" />
        <el-table-column prop="codeNo" label="审核人" align="center" />
      </el-table>
    </section>
    <footer>
      <el-pagination
        :page-sizes="[10, 20, 50, 100]"
        style="text-align: right"
        layout="total, sizes, prev, pager, next, jumper"
        :total="page.total"
        :page-size="page.size"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
      />
    </footer>


  </div>
</template>

<script>
  import receiptAPI from '@/api/receipt/receipt'
  import listMixin from '@/mixin/listMixin'
  export default {
    name: 'ReceiptWaitHandleList',
    mixins: [listMixin],
    data() {
      return {
        receipt: {
          docId: null,
          docTitle: '',
          docCode: '',
          codeName: '',
          codeYear: '',
          codeNo: '',
          receiptDate: '',
          receiptUnit: '',
          archiveType:'',
          docLevel:'',
          storePeriod:'',
          receiptContent:'',
          auditor:'',
          docState:'',
          signIndex:'',
          signCount:'',
          parentDocId:'',
          hasIssue:'',
          creator:''
        },
        mixinParams: {
          addUrl: '',
          editUrl: '',
          propertyName: 'docId',
          API: receiptAPI
        }
      }
    },
    created() {
    },
    computed:{
    },
    methods: {
      goDetail(id){
        this.$router.push('/receipt/receipt-wait-handle-detail/'+id+'/'+true)
      },
      fetchData() {
        receiptAPI.getMyBacklogList(this.page).then(res => {
          this.page.total = res.total
          this.tableData = res.records
        }).catch(err => {
          console.log(err)
        })
      },
    }
  }
</script>

<style lang="scss">


</style>

<style scoped lang="scss">

  .tool {
    font-size: 13px;
    color:#ccc;
  }
  .btn-fade-enter-active, .btn-fade-leave-active {
    transition: opacity .3s;
  }
  .btn-fade-enter, .btn-fade-leave-to {
    opacity: 0;
  }
  .el-link {
    color: #1890ff;
  }

</style>


